package com.chendechao.lib_base

import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.launch

open class BaseRepository {
    protected val ioScope  = CoroutineScope(SupervisorJob()+Dispatchers.IO)
    protected fun <T> executeOnIo(block : suspend () -> T) = ioScope.launch { block() }
}